<?php
/**
 * Created by PhpStorm.
 * User: win7
 * Date: 2018/5/4
 * Time: 14:12
 */

namespace app\api\model;

use think\Model;

class Image extends BaseModel
{
    protected $hidden = ['id', 'delete_time', 'update_time', 'from'];

    /*
     * 处理网络图片或者本地图片url
     * $value url字段
     * $data image数据表对应的一行字段名
     * */
    public function getUrlAttr($value, $data) {
        return $this->prefixImgUrl($value, $data);
    }
}